home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Utilities / Upgrade / RptToRepConv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-20  |  6.0 KB  |  152 lines

  1. /******************************************************************************
  2. * Filename:      RptToRepConv.H                                               *
  3. * Last Modified: 11/12/97                                                     *
  4. * Author:        Jim Sare                                                     *
  5. *                                                                             *
  6. * Created under agreement with KSoft, Inc. for Borland International, Inc.    *
  7. *                                                                             *
  8. * Copyright (c) 1997 Borland International, Inc.  All Rights Reserved.        *
  9. *                                                                             *
  10. ******************************************************************************/
  11. *
  12. #define CRWBAND_RPTHEADER    2000  // 07D0
  13. #define CRWBAND_GRPHEADER    3000  // 0BB8
  14. #define CRWBAND_RPTDETAIL    4000  // 0FA0
  15. #define CRWBAND_GRPFOOTER    5000  // 1388
  16. #define CRWBAND_GRNDTOTAL    6000  // 1770
  17. #define CRWBAND_RPTFOOTER    7000  // 1B58
  18.  
  19. #define HTML_DEFCOLOR        0
  20. #define HTML_DEFFACE            "MS Sans Serif"
  21. #define HTML_DEFFNSZ            10
  22. #define HTML_DEFBOLD            400
  23. #define HTML_DEFITAL            False
  24. #define HTML_DEFUNLN            False
  25. #define HTML_DEFSTRK            False
  26.  
  27. #DEFINE QALIAS                    1            // Alias of table
  28. #DEFINE QTABLENAME            2            // Table name
  29. #DEFINE QSELECTAREA            3            // Work area
  30. #DEFINE QPARENTFIELD            4            // Field in parent that relates to child
  31. #DEFINE QPARENTTABLE            5            // ALIAS of parent table in relation
  32. #DEFINE QORDER                6            // Index expression
  33. #DEFINE QERROR                    7            // Error code
  34. #DEFINE QTAG                    8            // Index tag name
  35.  
  36. #define MAXLINELEN        78          // For streaming comments to report file
  37. #define CR                    Chr(13)
  38. #define LF                    Chr(10)
  39. #define NEWLINE            CR + LF
  40. #define ALLTRIM(s)        (LTrim(RTrim(s)))
  41. #define STRIPNULL(s)        (IIf(RAt(Chr(0), s) > 0, Left(s, RAt(Chr(0), s) - 1), s))
  42. #define CHARNUM(n)        (LTrim(Str(n)))
  43.  
  44. // Extract 8, 16, and 32-bit numeric values from buffered values.
  45. #ifndef MAKE8
  46.    #define MAKE8(cBuff, nIndex)    (Asc(SubStr(cBuff, nIndex)))
  47. #endif
  48. #ifndef MAKEU16
  49.    #define MAKEU16(cBuff, nIndex)  (Int(MAKE8(cBuff, nIndex) +;
  50.                                    BitLShift(MAKE8(cBuff, nIndex + 1), 8)))
  51. #endif
  52. #ifndef MAKEU24
  53.    #define MAKEU24(cBuff, nIndex)  (Int(MAKE8(cBuff, nIndex) +;
  54.                                    BitLShift(MAKE8(cBuff, nIndex + 1), 8) +;
  55.                                    BitLShift(MAKE8(cBuff, nIndex + 2), 16)))
  56. #endif
  57. #ifndef MAKEU32
  58.    #define MAKEU32(cBuff, nIndex)  (Int(MAKE8(cBuff, nIndex) +;
  59.                                    BitLShift(MAKE8(cBuff, nIndex + 1), 8) +;
  60.                                    BitLShift(MAKE8(cBuff, nIndex + 2), 16) +;
  61.                                    BitLShift(MAKE8(cBuff, nIndex + 3), 24)))
  62. #endif
  63.  
  64. // Create HEX string from WinAPI RGBTriple structure
  65. #ifndef RGBTriple
  66.     #define RGBTriple(cBuff, nIndex) (IToH(MAKEU24(cBuff, nIndex), 6))
  67. #endif
  68.  
  69. // Extract 8, 16, and 32-bit numeric values from VdB 7 strings.
  70. #ifndef GET8
  71.    #define GET8(cBuff, nIndex)    (cBuff.GetByte(nIndex))
  72. #endif
  73. #ifndef GETU16
  74.    #define GETU16(cBuff, nIndex)  (Int(GET8(cBuff, nIndex) +;
  75.                                    BitLShift(GET8(cBuff, nIndex + 1), 8)))
  76. #endif
  77. #ifndef GETU24
  78.    #define GETU24(cBuff, nIndex)  (Int(GET8(cBuff, nIndex) +;
  79.                                    BitLShift(GET8(cBuff, nIndex + 1), 8) +;
  80.                                    BitLShift(GET8(cBuff, nIndex + 2), 16)))
  81. #endif
  82. #ifndef GETU32
  83.    #define GETU32(cBuff, nIndex)  (Int(GET8(cBuff, nIndex) +;
  84.                                    BitLShift(GET8(cBuff, nIndex + 1), 8) +;
  85.                                    BitLShift(GET8(cBuff, nIndex + 2), 16) +;
  86.                                    BitLShift(GET8(cBuff, nIndex + 3), 24)))
  87. #endif
  88.  
  89. // DEVMODE dmFields masks
  90. #define DM_ORIENTATION      0x00000001  // Device supports page rotation
  91. #define DM_PAPERSIZE        0x00000002  // Device supports paper sizes
  92. #define DM_PAPERLENGTH      0x00000004
  93. #define DM_PAPERWIDTH       0x00000008
  94. #define DM_SCALE            0x00000010
  95. #define DM_COPIES           0x00000100  // Device supports multiple copies
  96. #define DM_DEFAULTSOURCE    0x00000200  // Device supports multiple sources
  97. #define DM_PRINTQUALITY     0x00000400  // Device supports multiple resolutions
  98. #define DM_COLOR            0x00000800  // Device supports color
  99. #define DM_DUPLEX           0x00001000  // Device supports duplex
  100. #define DM_YRESOLUTION      0x00002000
  101. #define DM_TTOPTION         0x00004000  // Device supports multiple font renderings
  102. #define DM_COLLATE          0x00008000
  103. #define DM_FORMNAME         0x00010000
  104. #define DM_LOGPIXELS        0x00020000
  105. #define DM_BITSPERPEL       0x00040000
  106. #define DM_PELSWIDTH        0x00080000
  107. #define DM_PELSHEIGHT       0x00100000
  108. #define DM_DISPLAYFLAGS     0x00200000
  109. #define DM_DISPLAYFREQUENCY 0x00400000
  110. #define DM_ICMMETHOD        0x00800000
  111. #define DM_ICMINTENT        0x01000000
  112. #define DM_MEDIATYPE        0x02000000
  113. #define DM_DITHERTYPE       0x04000000
  114.  
  115. // Field Indices Into DEVMODE Structure
  116. #define IND_DMSPECVERSION   33
  117. #define IND_DMDRIVERVERSION 35
  118. #define IND_DMSIZE          37
  119. #define IND_DMDRIVEREXTRA   39
  120. #define IND_DMFIELDS        41
  121. #define IND_DMORIENTATION   45
  122. #define IND_DMPAPERSIZE     47
  123. #define IND_DMPAPERLENGTH   49
  124. #define IND_DMPAPERWIDTH    51
  125. #define IND_DMSCALE         53
  126. #define IND_DMCOPIES        55
  127. #define IND_DMDEFAULTSOURCE 57
  128. #define IND_DMPRINTQUALITY  59
  129. #define IND_DMCOLOR         61
  130. #define IND_DMDUPLEX        63
  131. #define IND_DMYRESOLUTION   65
  132. #define IND_DMTTOPTION      67
  133.  
  134. // Paper Size Options
  135. #define DMPAPER_LETTER       1   // Letter (8 1/2 x 11 in
  136.  
  137. // Paper Bin Sources
  138. #define DMBIN_MANUAL         4   // Manual feed
  139.  
  140. #define OUT_DEFAULT_PRECIS        0
  141. #define CLIP_DEFAULT_PRECIS    0
  142. #define DEFAULT_QUALITY            0
  143. #define DEFAULT_PITCH            0
  144. #define FF_DONTCARE                0
  145. #define ANSI_CHARSET                0
  146.  
  147. #define LOGPIXELSX                88
  148. #define LOGPIXELSY                90
  149.  
  150. #define MM_TWIPS                    6
  151.  
  152.